package cn.gailvlun.gll.net.wish;


import java.util.HashMap;

import cn.gailvlun.gll.net.ListRes;
import cn.gailvlun.gll.net.token.Authorization;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;


public interface WishService {


    @Authorization
    @GET("/wish/list/")
    Observable<ListRes<Wish>> getWishRecords(@Query("id") Integer id,
                                       @Query("limit") Integer limit,
                                       @Query("type") String type,
                                       @Query("direction") String direction);

    @Authorization
    @GET("/wish/record/")
    Observable<Wish> getWishRecord();


    @Authorization
    @PUT("wish/record/")
    Observable<HashMap> refuse(@Body  OperationRecordReq req);


    @Authorization
    @PUT("/wish/record/")
    Observable<Wish> accept(@Body OperationRecordReq req);


    @Authorization
    @PUT("/wish/record/")
    Observable<Wish> realized(@Body OperationRecordReq req);

    @Authorization
    @PUT("/wish/record/")
    Observable<Wish> comment(@Body OperationRecordReq req);


    @Authorization
    @POST("/wish/record/")
    Observable<MakeWish> makeWish(@Body MakeWishReq req);

    @Authorization
    @GET("/wish/template/")
    Observable<WishTemplate> getTemplate();

}

